function rightIn(){
   var a=document.getElementById("getNumber").value;
   var append=document.getElementById("box");
   var newNode = document.createElement("div");
   newNode.setAttribute("class","number");
   newNode.innerHTML=a;
   newNode.onclick = foo;
   append.appendChild(newNode);
}
function leftIn(){
	var b =document.getElementById("box").childNodes[0];
   var a=document.getElementById("getNumber").value;
   var append=document.getElementById("box");
   var newNode = document.createElement("div");
   newNode.setAttribute("class","number");
   newNode.innerHTML=a;
   newNode.onclick = foo; 
   append.insertBefore(newNode,b);
   
}
function leftOut(){
	var b =document.getElementById("box").childNodes[0];
	var append=document.getElementById("box");
	append.removeChild(b);
}
function rightOut(){
    var b =document.getElementById("box").lastChild;
	var append=document.getElementById("box");
	append.removeChild(b);
}
function foo(event){
	console.log(event);
	event.target.parentNode.removeChild(event.target);
console.log("123");

}